<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset=="UTF-8">
    <title>Title</title>
</head>
<body>
    {% if name_list %}
      <ul>
      {% for elem in name_list %}
        <li>
          <h3>{{ elem.title }}</h3>
          <p>{{ elem.name }}</p>
        </li>
      {% endfor %}
      </ul>
    {% else %}
      <p>no data</p>
    {% endif %}
</body>
</html>